# -*- coding: utf-8 -*-
from Mysql import util, dbmysql
import time
def insert_people(**kwargs):
    rs=None
    try:
        sql="insert into people (uid,title,time,hot) value ('%s','%s','%s','%s');"%(kwargs['uid'],kwargs['title'],kwargs['time'],kwargs['hot'])
        sql = sql.replace('\\', '-').replace('\n', '').replace('\r', '').replace('\t', '')
        rs=dbmysql.query(sql)
    except Exception as e:
        util.logger.error(e)
    return rs
def insert_people_img(**kwargs):
    rs=None
    try:
        sql="insert into people_img (uid,descs,img) value ('%s','%s','%s');"%(kwargs['uid'],kwargs['descs'],kwargs['img'])
        sql = sql.replace('\\', '-').replace('\n', '').replace('\r', '').replace('\t', '')
        rs=dbmysql.query(sql)
    except Exception as e:
        util.logger.error(e)
    return rs